<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <title></title>
    [#include "/admin/include/admin_static.htm"]
    <script>
        function del(id) {
            layui.confirm("确定要删除该记录吗？", function () {
                var options = {
                    dataType: "text",
                    url: '${path}/admin/link/delete.aspx?id=' + id,
                    success: function (result) {
                       layer.msg(result);
                    }
                };
                $("#form1").ajaxSubmit(options);
            });
        }
    </script>
</head>
<body>
<div class="main_admin_content">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>友情连接列表</legend>
    </fieldset>
    <a href="${path}/admin/link/add.aspx"  class="layui-btn" style="width: 100px; heigth: 30px; line-height: 30px" >添加</a>

    <table class="layui-table">
        <colgroup>
            <col width="50">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">

        </colgroup>
        <thead>
        <tr>
            <th>序号</th>
            <th>名称</th>
            <th>连接</th>
            <th>图片</th>
            <th>排序id</th>
            <th>修改</th>
            <th>删除</th>
        </tr>
        </thead>
        [#list linklist as link]
            <tr>
                <td>${link.id}</td>
                <td>${link.name }</td>
                <td>
                    <a style="color: red;" href="${link.link }" target="_blank">${link.link}</a>
                </td>
                <td><img id="previe1" src="${link.logo} "  style="width: 118px;height: 44px;"/></td>
                <td>${link.orderid }</td>
                <td>
                    <input type="button"  onclick="window.location.href='${path}/admin/link/add.aspx?id=${link.id}'" value="修改" class="layui-btn"/>
                </td>
                <td>
                    <input type="button" onclick="del(${link.id })"  value="删除" class="layui-btn"/>
                </td>
            </tr>
        [/#list]
    </table>
    <form id="form1"></form>

</div>
</body>
</html>